package com.lyx.shopcard.vo;
import com.baomidou.mybatisplus.core.metadata.IPage;

import lombok.Data;

import java.io.Serializable;
import java.util.List;


@Data
public class PageVO<T> implements Serializable {
    private static final long serialVersionUID = 1L;
    //"总条数"

    private long totalCount;
   //"每页条数"

    private long size;
    //"总页数"

    private long totalPage;
    // "当前页数"

    private long current;
    // "列表数据"
    private List<T> list;


    public PageVO(IPage<T> page) {
        this.list = page.getRecords();
        this.totalCount = page.getTotal();
        this.size = page.getSize();
        this.current = page.getCurrent();
        this.totalPage = page.getPages();
    }
}

